/**
 * 配置
 * */
package org.zmhhxl.user.domain.repository;

import org.springframework.data.jpa.repository.JpaRepository;
import org.zmhhxl.api.auth.domain.entity.ThirdPartyUser;
import org.zmhhxl.api.auth.domain.entity.UserInfo;
import org.zmhhxl.api.auth.domain.entity.UserThirdPartyUser;

import java.util.Set;

public interface UserThirdPartyUserRepository extends JpaRepository<UserThirdPartyUser, Long> {
    UserThirdPartyUser findByUserIdAndThirdPartyUserId(Long userId, Long thirdPartyUserId);
    void deleteByUserIdAndThirdPartyUserId(Long userId, Long thirdPartyUserId);
    UserThirdPartyUser save(UserThirdPartyUser userThirdPartyUser);

    Set<UserInfo> findByThirdPartyUserId(Long thirdPartyUserId);
    Set<ThirdPartyUser> findByUserId(Long userId);
}
